package com.etc.library.controller;

import com.etc.library.pojo.Message;
import com.etc.library.util.EmailUtil;
import com.etc.library.util.ResultBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    private EmailUtil emailUtil;

    @GetMapping("/send")
    public ResultBody send() {

        emailUtil.send("测试主题","主题内容，王千万,金昱彤","2727680685@qq.com","2487277039@qq.com");
        return ResultBody.success();
    }
}
